namespace NAct.Tests.Research
{
	using System;

	internal class TestType
	{
		public TestType()
		{
			Logger = Console.WriteLine;
		}

		public Action<string> Logger { get; set; }

		public void DisplayName( string name )
		{
			Logger( string.Format( "Name is {0}", name ) );
		}

		public void DisplayAge( int age )
		{
			Logger( string.Format( "Age is {0}", age ) );
		}

		public void DisplayIntegers( int[] values )
		{
			Logger( "Values are:" );
			Array.ForEach( values, value => Logger( value.ToString() ) );
		}

		public void DisplayFloat( float pi )
		{
			Logger( string.Format( "Pi is {0}", pi ) );
		}

		public void DisplayUserInfo( string forename, string surname, int age, int[] votes )
		{
			Logger( string.Format( "given a user called {0} {1} who is {2} years old", forename, surname, age ) );
			Logger( "Voted: " );
			Array.ForEach( votes, vote => Logger( vote.ToString() ) );
		}
	}
}